<html>
 <head>
  <link href="./leetcode-problem.css" rel="stylesheet" type="text/css">
 </head>
 <body>
  <div class="question_difficulty">
   难度：Medium
  </div>
  <div>
   <h1 class="question_title">
    177. Nth Highest Salary
   </h1>
   <p>
    Write a SQL query to get the
    <em>
     n
    </em>
    <sup>
     th
    </sup>
    highest salary from the
    <code>
     Employee
    </code>
    table.
   </p>
   <pre>
+----+--------+
| Id | Salary |
+----+--------+
| 1  | 100    |
| 2  | 200    |
| 3  | 300    |
+----+--------+
</pre>
   <p>
    For example, given the above Employee table, the
    <em>
     n
    </em>
    <sup>
     th
    </sup>
    highest salary where
    <em>
     n
    </em>
    = 2 is
    <code>
     200
    </code>
    . If there is no
    <em>
     n
    </em>
    <sup>
     th
    </sup>
    highest salary, then the query should return
    <code>
     null
    </code>
    .
   </p>
   <pre>
+------------------------+
| getNthHighestSalary(2) |
+------------------------+
| 200                    |
+------------------------+
</pre>
  </div>
  <div>
   <h1 class="question_title">
    177. 第N高的薪水
   </h1>
   <p>
    编写一个 SQL 查询，获取
    <code>
     Employee
    </code>
    表中第&nbsp;
    <em>
     n&nbsp;
    </em>
    高的薪水（Salary）。
   </p>
   <pre>+----+--------+
| Id | Salary |
+----+--------+
| 1  | 100    |
| 2  | 200    |
| 3  | 300    |
+----+--------+
</pre>
   <p>
    例如上述&nbsp;
    <code>
     Employee
    </code>
    &nbsp;表，
    <em>
     n = 2&nbsp;
    </em>
    时，应返回第二高的薪水&nbsp;
    <code>
     200
    </code>
    。如果不存在第&nbsp;
    <em>
     n&nbsp;
    </em>
    高的薪水，那么查询应返回&nbsp;
    <code>
     null
    </code>
    。
   </p>
   <pre>+------------------------+
| getNthHighestSalary(2) |
+------------------------+
| 200                    |
+------------------------+
</pre>
  </div>
 </body>
</html>